home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 201 / DPCS1104.ISO / Full / QuickBooks / QBTutor / Lesson5 / Lesson5.dcr / 00287_Customer-Job field selected.ls < prev    next >
Encoding:
Text File  |  2001-02-01  |  1.1 KB  |  41 lines

  1. property pDeviantTarget, spriteNum
  2. global immutableCustomers, mutableCustomers
  3.  
  4. on getPropertyDescriptionList
  5.   description = [:]
  6.   addProp(description, #pDeviantTarget, [#default: EMPTY, #format: #string, #comment: "Not In List Target:"])
  7.   return description
  8. end
  9.  
  10. on doListSelect
  11.   unfound = "TRUE"
  12.   repeat with i = 1 to immutableCustomers.count
  13.     if immutableCustomers[i].Customer = sprite(spriteNum).member.text then
  14.       doFillInvoice(immutableCustomers[i])
  15.       unfound = "FALSE"
  16.       exit repeat
  17.     end if
  18.   end repeat
  19.   if unfound = "TRUE" then
  20.     repeat with i = 1 to mutableCustomers.count
  21.       if mutableCustomers[i].Customer = sprite(spriteNum).member.text then
  22.         doFillInvoice(mutableCustomers[i])
  23.         unfound = "FALSE"
  24.         exit repeat
  25.       end if
  26.     end repeat
  27.   end if
  28.   if unfound <> "FALSE" then
  29.     if pDeviantTarget <> EMPTY then
  30.       go(pDeviantTarget)
  31.     end if
  32.   end if
  33. end
  34.  
  35. on doFillInvoice corpse
  36.   member("field:Bill To").text = corpse.BillTo
  37.   member("field:Ship To").text = corpse.ShipTo
  38.   member("field:Terms").text = corpse.Terms
  39.   member("field:Rep").text = corpse.Rep
  40. end
  41.